<?php

namespace App\Http\Controllers\Manager;

use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class RecommendController extends Controller
{
    public $prefix='manager.recommend';
    public function index(){
        $id=Auth::id();
        $url='http://'.env('DOMAIN_MANAGE').'/recommend?rec='.$id;
        $list=User::where('pid',$id)->orderBy('id','desc')->paginate(12);
        return view($this->prefix.'.index',compact('url','list'));
    }
}
